/**
 * org.assess.oa.system.dao.impl.TbPostDAOImpl
 */
package org.assess.oa.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.assess.core.dao.BaseDAOImpl;
import org.assess.oa.system.bean.TbPost;
import org.assess.oa.system.dao.TbPostDAO;

/**
 * @description 操作岗位表的DAO层实现类
 * @author XiaLongxiang
 * @createtime 2012-6-5 上午10:00:03
 */
public class TbPostDAOImpl extends BaseDAOImpl<TbPost> implements TbPostDAO {
    public TbPost queryTbPostById(String post_id) {
        return (TbPost) sqlClient.queryForObject("queryTbPostById", post_id);
    }
    
    public int queryTbPostAsInt(Map<String, Object> parameters) {
        return (Integer) sqlClient.queryForObject("queryTbPostAsInt", parameters);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbPost> queryTbPostAsList(int startNum, int rows, Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbPostAsList", parameters, startNum, rows);
    }
    
    public boolean deleteTbPostById(String post_id) {
        sqlClient.delete("deleteTbPostById", post_id);
        return true;
    }
}
